import { createApp } from 'vue';
import { router } from './router/index.js';

import { createPinia } from 'pinia';

//饿了吗ui导入
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import App from './App.vue';
const app = createApp(App);
//使用路由
app.use(router);
//使用饿了么ui
app.use(ElementPlus, {
    locale: zhCn,
});
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
//使用pinia
app.use(createPinia());
    
app.mount('#app');

